package com.woniuxy.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.woniuxy.dao.DeptMapper;
import com.woniuxy.pojo.Dept;
import com.woniuxy.service.DeptService;
@Transactional
@Service
public class DeptServiceImpl implements DeptService{

	@Autowired
	private DeptMapper deptMapper;
	@Override
	public List<Dept> getAllDepts() {
		// TODO Auto-generated method stub
		return deptMapper.selectAllDepts();
	}
	@Override
	public Dept getDeptById(Integer id) {
		// TODO Auto-generated method stub
		return deptMapper.selectDeptById(id);
	}
	@Override
	public void addDept(Dept dept) {
		// TODO Auto-generated method stub
		deptMapper.addDept(dept);
	}
	@Override
	public void updateDept(Dept dept) {
		// TODO Auto-generated method stub
		deptMapper.updateDept(dept);
	}
	@Override
	public void deleteDeptById(Integer id) {
		// TODO Auto-generated method stub
		deptMapper.deleteDeptById(id);
	}
	@Override
	public void deleteDeptsById(String ids) {
		// TODO Auto-generated method stub
		deptMapper.delDeptsById(ids);
	}

}
